var url = "http://hengzhi.ayvvv.com";
var serCmsData = localStorage.getItem('token');
setTimeout(function () {
    amend_xiu();
}, 200)

function amend_xiu() {
    var amend_x = getUrlParam('amend_x');
    console.log(amend_x)
    $.ajax({
        url: url + '/api/user/address/detail/' + amend_x,
        type: 'get',
        dataType: 'json',
        // data: data,
        async: true,
        headers: {
            "x-token": serCmsData
        },
        success: function (data) {
            if (data.status == 200) {
                console.log(data)
                var goback = data.data;
                $('#npo').val(goback.real_name);
                $('#aaappro').val(goback.real_name);
                $('#urbanizat').val(goback.city);
                $('#district').val(goback.district);
                $('#particular').val(goback.detail);
                $('#phone').val(goback.phone);
                $('.btnnnn').click(function(){
                    location.href="address.html"
                })
              
              
            }else{
                window.location.href="login.html";
            }
        }
    });

}